package 练习;

import java.util.Scanner;
public class demo {
    public static void main(String [] args){
        long [] m ;
        System.out.print("请输入大于3的月数 : ");
        Scanner s = new Scanner(System.in);
        int i = s.nextInt();
        m = new long[i];

        if(m.length >= 1){
            m[0] = m[1] = 1;//第一和第二个月的兔子都是：1
        }
        for(int j = 0; j < m.length; j++){
            if(j == 0 || j == 1){
                System.out.println("第" + (j+1) +"个月"+ "\t兔子总数 : " + 2*m[j]);
            }else {
                m[j] = m[j-2] + m[j-1];//第三个月以后都满足规律：m[j] = m[j-2] + m[j-1]
                System.out.println("第" + (j+1)+"个月" + "\t兔子总数 : " + 2*m[j]);
            }
        }
    }

}